#!/bin/sh

if [ ! -e "/usr/java7_64/bin/java" ];then
    echo "lacked java7"
    exit 1
fi

if [ ! -e "lblet-aix.jar" ];then
    echo "lblet package"
    exit 1
fi

echo "change file properties"
root=/opt/howlink/linkBackup
mkdir -p $root/log
mkdir -p $root/touch
mkdir -p $root/store
chown -R root:system $root/resource
chmod -R 755 $root/resource

echo "install rc shell"
cp rc.lblet.sh /etc/rc.d/rc2.d/lblet
chmod 700 /etc/rc.d/rc2.d/lblet

echo "install OK"